cpuidle: fix the menu governor to enhance IO performance
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 14 Dec 2009 07:54:53 +0000 (07:54 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 14 Dec 2009 07:54:53 +0000 (07:54 +0000)
commit3535332327305778c02ac1a8fc49bec29e842b20
tree699ac03b5769fd7d7a8be3573a23f50700e0ad38
parent018b6522ced796ef149bb2063db2d3d3643f17f1
cpuidle: fix the menu governor to enhance IO performance

this is a revised version of linux upstream commit
69d25870f20c4b2563304f2b79c5300dd60a067e:

"
    cpuidle: fix the menu governor to boost IO performance

    Fix the menu idle governor which balances power savings, energy
    efficiency
    and performance impact.

    The reason for a reworked governor is that there have been
    serious
    performance issues reported with the existing code on Nehalem
    server
    systems.

    To show this I'm sure Andrew wants to see benchmark results:
    (benchmark is "fio", "no cstates" is using "idle=3Dpoll")

            no cstates  current linux   new algorithm
    1 disk      107 Mb/s    85 Mb/s     105 Mb/s
    2 disks     215 Mb/s    123 Mb/s    209 Mb/s
    12 disks    590 Mb/s    320 Mb/s    585 Mb/s

    In various power benchmark measurements, no degredation was found
    by our
    measurement&diagnostics team.  Obviously a small percentage more
    power was
    used in the "fio" benchmark, due to the much higher performance.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
"

in Xen version, most logic is similar and with only one exception:
linux use nr_iowait and loadavg to track the pending I/O request,
which however is not visible to Xen. so Xen use the do_irq frequency
to estimate the I/O pressure. this is not as accurate as linux, and
the better approach is to convey guest latency requirement to
hypervisor by virtual C state. this can be the future enhancement.

the detail algorithm description is in code comment. with this new
algorithm, fio benchmark performance improve ~5% with 1 disk. and no
power degration is found in idle case.

Signed-off-by: Yu Ke <ke.yu@intel.com>
xen/arch/x86/acpi/cpuidle_menu.c
xen/arch/x86/hpet.c
xen/arch/x86/irq.c
xen/include/asm-x86/irq.h
xen/include/xen/cpuidle.h